namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0023 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.SysApprovalTaskDtlEmployee",
                c => new
                    {
                        ApprovalTaskDtlEmpId = c.Int(nullable: false, identity: true),
                        ApprovalTaskDtlId = c.Int(),
                        EmpId = c.Int(),
                    })
                .PrimaryKey(t => t.ApprovalTaskDtlEmpId)
                .ForeignKey("dbo.hrm_ps_employees", t => t.EmpId)
                .ForeignKey("dbo.SysApprovalTaskDtl", t => t.ApprovalTaskDtlId)
                .Index(t => t.EmpId)
                .Index(t => t.ApprovalTaskDtlId);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.SysApprovalTaskDtlEmployee", new[] { "ApprovalTaskDtlId" });
            DropIndex("dbo.SysApprovalTaskDtlEmployee", new[] { "EmpId" });
            DropForeignKey("dbo.SysApprovalTaskDtlEmployee", "ApprovalTaskDtlId", "dbo.SysApprovalTaskDtl");
            DropForeignKey("dbo.SysApprovalTaskDtlEmployee", "EmpId", "dbo.hrm_ps_employees");
            DropTable("dbo.SysApprovalTaskDtlEmployee");
        }
    }
}
